package cn.bugio.task01.service.impl;

import cn.bugio.task01.service.ICar;
import cn.bugio.task01.service.IDriver;

/**
 * <h1></h1>
 *
 * @version 1.0
 * @author: Vincent Vic
 * @since: 2021/09/08
 */
public class Driver implements IDriver {
    private ICar iCar;


    @Override
    public void driver() {
        System.out.println("构造启动驾驶。。。。");
        this.iCar.run();
    }

    @Override
    public void driver(ICar iCar) {
        System.out.println("指定启动驾驶。。。。");
        iCar.run();
    }

    @Override
    public void setCar(ICar iCar) {
        this.iCar = iCar;
    }
}
